package geektime.spring.springbucks.mapper;

import geektime.spring.springbucks.model.Coffee;
import geektime.spring.springbucks.params.PageParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CoffeeMapper {
    Coffee findById(@Param("id") Long id);

    void saveAll(@Param("list") List<Coffee> coffees);

    void save(Coffee coffee);

    void update(Coffee coffee);

    List<Coffee> selectAll();

    int deleteById(@Param("id") Long id);

    void deleteAll();

    List<Coffee> selectListByIds(List<Long> ids);

    void upadteData(@Param("list") List<Coffee> coffees);

}
